package com.kanesoft.android.gdx.actors.fight;

import com.kanesoft.android.gdx.control.WorldControl;
import com.kanesoft.android.gdx.widgets.sprites.SpriteInfo;
import com.kanesoft.android.gdx.widgets.sprites.SpriteSlideInfo;

public class FightActorRyu extends FightActorObject {

    private SpriteInfo siActionWaiting;
    private SpriteInfo siActionWalking;
    private SpriteInfo siActionPunch;
    private SpriteInfo siActionJump;
    private SpriteInfo siActionFallingPunch;
    private SpriteInfo siActionFallingKick;
    private SpriteInfo siActionHittenByPunch;
    private SpriteInfo siActionThrowingFireball;
    private SpriteInfo siActionFireballReleased;


    public FightActorRyu(int x, int y, float scale, WorldControl worldCtrl) {
        super(x, y, scale*2, scale*3.4f, worldCtrl);
    }
    
    
    protected void initializeMoviments() {
        siActionWaiting = new SpriteInfo("data/street_fighter_ryu_red_1024x1024.png", 0.300f);
        siActionWaiting.addSpriteSlide(new SpriteSlideInfo(0, 0, 47, 82));
        siActionWaiting.addSpriteSlide(new SpriteSlideInfo(47, 0, 47, 82));
        siActionWaiting.addSpriteSlide(new SpriteSlideInfo(96, 0, 47, 82));
        waitingState = new FighterWaiting(siActionWaiting, this);
        loseState = new FighterLose(siActionWaiting, this);
        winState = new FighterWin(siActionWaiting, this);  

        siActionWalking = new SpriteInfo(siActionWaiting, 0.150f);
        siActionWalking.addSpriteSlide(new SpriteSlideInfo(246, 89, 289 - 246, 170 - 89));
        siActionWalking.addSpriteSlide(new SpriteSlideInfo(293, 88, 335 - 293, 170 - 88));
        siActionWalking.addSpriteSlide(new SpriteSlideInfo(342, 88, 385 - 342, 170 - 88));
        siActionWalking.addSpriteSlide(new SpriteSlideInfo(389, 88, 431 - 389, 170 - 88));
        walkingForwardState = new FighterWalkingForward(siActionWalking, this);
        walkingBackwardState = new FighterWalkingBackward(siActionWalking, this);

        siActionPunch = new SpriteInfo(siActionWaiting, 0.130f);
        siActionPunch.addSpriteSlide(new SpriteSlideInfo(0, 83, 45, 85));
        siActionPunch.addSpriteSlide(new SpriteSlideInfo(45, 83, 60, 85, true));
        siActionPunch.addSpriteSlide(new SpriteSlideInfo(106, 83, 54, 85));
        siActionPunch.addSpriteSlide(new SpriteSlideInfo(160, 83, 71, 85, true));
        punchingState = new FighterPunching(siActionPunch, this); 
        
        siActionJump = new SpriteInfo(siActionWaiting, 0.150f);
        siActionJump.addSpriteSlide(new SpriteSlideInfo(245, 187, 286 - 245, 254 - 187));
        siActionJump.addSpriteSlide(new SpriteSlideInfo(245, 187, 286 - 245, 254 - 187));
        jumpingState = new FighterJumping(siActionJump, this);
        fallingState = new FighterFalling(siActionJump, this); 
        
        siActionFallingKick = new SpriteInfo(siActionWaiting, 0.150f);
        siActionFallingKick.addSpriteSlide(new SpriteSlideInfo(446, 203, 509 - 446, 254 - 203, true));
        siActionFallingKick.addSpriteSlide(new SpriteSlideInfo(446, 203, 509 - 446, 254 - 203, true));
        fallingKickState = new FighterFallingKick(siActionFallingKick, this); 
        
        
        siActionFallingPunch = new SpriteInfo(siActionWaiting, 0.150f);
        siActionFallingPunch.addSpriteSlide(new SpriteSlideInfo(291, 201, 345 - 291, 254 - 201, true));
        siActionFallingPunch.addSpriteSlide(new SpriteSlideInfo(291, 201, 345 - 291, 254 - 201, true));
        fallingPunchState = new FighterFallingPunch(siActionFallingPunch, this);
        
                // Hit Actions......
        siActionHittenByPunch = new SpriteInfo(siActionWaiting, 0.300f);
        siActionHittenByPunch.addSpriteSlide(new SpriteSlideInfo(528, 4, 573 - 528, 83 - 4));
        siActionHittenByPunch.addSpriteSlide(new SpriteSlideInfo(528, 4, 573 - 528, 83 - 4));
        hittenByPunch = new FighterHittenByPunch(siActionHittenByPunch, this);
        hittenByKick = new FighterHittenByKick(siActionHittenByPunch, this);
        hittenByFallingKick = new FighterHittenByFallingKick(siActionHittenByPunch, this);
        hittenByFallingPunch = new FighterHittenByFallingPunch(siActionHittenByPunch, this);
        hittenByPowerFireball = new FighterHittenByPowerFireball(siActionHittenByPunch, this);
        hittenInTheAir = new FighterHittenInTheAir(siActionHittenByPunch, this);
        
        

        siActionThrowingFireball = new SpriteInfo(siActionWaiting, 0.150f);
        siActionThrowingFireball.addSpriteSlide(new SpriteSlideInfo(529, 335, 577 - 529, 417 - 335));
        siActionThrowingFireball.addSpriteSlide(new SpriteSlideInfo(582, 341, 639 - 582, 417 - 341));
        siActionThrowingFireball.addSpriteSlide(new SpriteSlideInfo(642, 344, 707 - 642, 417 - 344));
        throwFireball = new FighterThrowFireball(siActionThrowingFireball, this);

        siActionFireballReleased = new SpriteInfo(siActionWaiting, 0.200f);
        siActionFireballReleased.addSpriteSlide(new SpriteSlideInfo(711, 347, 780 - 711, 417 - 347));
        siActionFireballReleased.addSpriteSlide(new SpriteSlideInfo(711, 347, 780 - 711, 417 - 347));
        fireballReleased = new FighterFireballReleased(siActionFireballReleased, this);
    }

}
